from django.http import JsonResponse

# 封装JsonResponse响应头
class ApiResponse(JsonResponse):

    def __init__(self, data_dict):
        res_info = {
            'code': 200,
            'msg': 'ok',
            'data': data_dict
        }
        super().__init__(res_info)